﻿using Ozone.Device;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Ozone.Views.Widget
{
    /// <summary>
    /// WindowSelGasType.xaml 的交互逻辑
    /// </summary>

    public partial class WindowSelGasType : Window
    {


        static public int ShowModal(int nSelIndex)
        {
            WindowSelGasType dlg = new WindowSelGasType(nSelIndex);
            dlg.ShowDialog();
            if (!dlg.bIsOK)
                return -1;
            else
                return dlg.combGas.SelectedIndex;
        }

        public bool bIsOK = false;
        public WindowSelGasType(int nSelIndex)
        {
            InitializeComponent();
            txtTitle.Text = "选择气体";
            combGas.Items.Clear();
          

            combGas.SelectedIndex = nSelIndex;
        }

      

        private void btn_Click(object sender, RoutedEventArgs e)
        {
            bIsOK = true;
            Close();
        }

        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            bIsOK = false;
            Close();
        }
    }
}
